/**
This file is part of Gel2DE.

    Gel2DE is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Gel2DE is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with Gel2DE.  If not, see <http://www.gnu.org/licenses/>.

	Copyright (C) 2012, University of Bergen
*/

// -*- C++ -*- generated by wxGlade 0.6.3 on Fri Jul 04 14:56:41 2008

#include <wx/wx.h>
#include <wx/image.h>
// begin wxGlade: ::dependencies
#include <wx/grid.h>
// end wxGlade


#include "wxVTKRenderWindowInteractor.h"
#include "GelImageViewer.h"
#include "ResultImageViewer.h"
#include "GelCorrelationAnalysis.h"
#include "TransferFunctionManager.h"
#include "ProjectConfiguration.h"
#include "vtkFileOutputWindow.h"
#include <math.h>
#include <wx/textdlg.h>

#ifndef GELCORRELATIONGUI_H
#define GELCORRELATIONGUI_H


// begin wxGlade: ::extracode
// end wxGlade


class GelImageAnalysisFrame: public wxFrame {
public:
    // begin wxGlade: GelImageAnalysisFrame::ids
    // end wxGlade

    GelImageAnalysisFrame(wxWindow* parent, int id, const wxString& title, const wxPoint& pos=wxDefaultPosition, const wxSize& size=wxDefaultSize, long style=wxDEFAULT_FRAME_STYLE);

private:
    // begin wxGlade: GelImageAnalysisFrame::methods
    void set_properties();
    void do_layout();
    // end wxGlade

	void initVTKDisplays(wxPanel*);
	void layoutVTKDisplays(wxFlexGridSizer*);
	void populateGelTable();
	void putGUIStateOnGelImages();
	void putGelImagesStateOnGUI();
	void EmptyGelTable();
	void SetImageType(int aType);
	void ShowTextEntryDialog();

protected:
    // begin wxGlade: GelImageAnalysisFrame::attributes
    wxMenuBar* frame_1_menubar;
    wxButton* wx_calcCorr;
	wxButton* wx_calcPermTest;
    wxRadioBox* wx_imgselector;
    wxRadioBox* wx_zoomNavigateRadio;
	wxRadioBox* wx_normalizationRadio;
    wxSlider* wx_FixedIntensitySlider;
    wxChoice* wx_resultMode;
    wxSlider* ctfSlider;
	wxSlider* wx_imgWindowSlider;
	wxSlider* wx_imgCenterSlider;
	wxSlider *wx_blurSlider;
    wxGrid* wx_gridFileList;
    wxPanel* panel_1;
    // end wxGlade

	GelCorrelationAnalysis* m_gelCorrelationAnalysis;
	ProjectConfiguration* m_projectConfiguration;
	wxVTKRenderWindowInteractor* m_imageDisplay;
	wxVTKRenderWindowInteractor* m_resultDisplay;

	vtkFileOutputWindow *m_fileLog;

	GelImageViewer* m_gelImageViewer;
	ResultImageViewer* m_resultImageViewer;
	TransferFunctionManager *m_ctfMgr;

    DECLARE_EVENT_TABLE();

public:
    virtual void CalcCorrClicked(wxCommandEvent &event); // wxGlade: <event_handler>
	virtual void CalcPermutationClicked(wxCommandEvent &event); //wxGlade: <event_handler>
    virtual void IntensityFixedChanged(wxScrollEvent &event); // wxGlade: <event_handler>
    virtual void ImageTypeChanged(wxCommandEvent &event); // wxGlade: <event_handler>
    virtual void CellSelected(wxGridEvent &event); // wxGlade: <event_handler>
    virtual void ResultModeChanged(wxCommandEvent &event); // wxGlade: <event_handler>
    virtual void NavigationModeChanged(wxCommandEvent &event); // wxGlade: <event_handler>
	virtual void NormalizationModeChanged(wxCommandEvent &event); //wxGlade: <event_handler>
    virtual void SaveRegistration(wxCommandEvent &event); // wxGlade: <event_handler>
	virtual void SaveProject(wxCommandEvent &event); // wxGlade: <event_handler>
	virtual void ExitApplication(wxCommandEvent &event); // wxGlade: <event_handler>
    virtual void OpenProject(wxCommandEvent &event); // wxGlade: <event_handler>
    virtual void ResultScreenDump(wxCommandEvent &event); // wxGlade: <event_handler>
    virtual void ctfScalerScrolled(wxScrollEvent &event); // wxGlade: <event_handler>
	virtual void CloseProject(wxCommandEvent &event); //wxGlade: <event_handler>
	virtual void ImgWindowChanged(wxScrollEvent &event); //wxGlade: <event_handler>
	virtual void ImgCenterChanged(wxScrollEvent &event); //wxGlade: <event_handler>
	virtual void BlurChanged(wxScrollEvent &event); //wxGlade: <event_handler>
	virtual void ExportData(wxCommandEvent &event); //wxGlade: <event_handler>
	virtual void ShowTextEntryDialog(wxCommandEvent &event); //wxGlade: <event_handler>

}; // wxGlade: end class


#endif // GELCORRELATIONGUI_H
